<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理 | 登陆</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="__STATIC__/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="__STATIC__/bower_components/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="__STATIC__/bower_components/Ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="__CSS__/AdminLTE.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="javascript:;"><b>后台</b>管理</a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        <p class="login-box-msg">登陆开始管理之路</p>
        <form action="{:Url('user/logon')}" autocomplete="off"
              class="layui-form" method="post">
            <div class="form-group has-feedback">
                <input type="email" name="username" class="form-control"
                       placeholder="用户名" lay-verify="required">
                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" name="password" class="form-control"
                       placeholder="密码" lay-verify="required">
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="row">
                <div class="col-xs-8" style="padding:0">
                    <div class="layui-form-item">
<!--                        <label class="layui-form-label"></label>-->
                        <div class="layui-input-block" style="margin-left: 15px;">
                            <input type="checkbox" name="switch"
                              lay-text="管理后台|商户平台" lay-skin="switch">
                        </div>
                    </div>
                </div>
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat"
                            lay-submit lay-filter="*">登&nbsp;陆</button>
                </div>
            </div>
        </form>

        <!-- /.social-auth-links -->
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 3 -->
<script src="__STATIC__/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="__STATIC__/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
<script src="__STATIC__/layui/layui.js"></script>
<script>
    $(function () {
        layui.use(['form','layer'],function () {
            var form = layui.form,
                layer = layui.layer;
            form.on('submit(*)', function(data){
                $.post(data.form.action,data.field,function (result) {
                    if(!result.status){
                        layer.msg(result.msg);
                        return false;
                    }
                    location.href = "{:Url('dashboard/index')}";
                });
                return false;
            });
        });
    });
</script>
<style>
    .layui-form-label{
        width: auto;
    }
    .layui-input-block{
        margin-left: 0;
    }
</style>
</body>
</html>
